package com.xy.dp.composite;

public class Program {
    public static void main(String[] args) {
        Files rootFile = new Files("root");
        rootFile.add(new Doc("fileA"));
        rootFile.add(new Doc("fileB"));

        Files files1 = new Files("files1");
        files1.add(new Doc("f1A"));
        files1.add(new Doc("f2A"));

        Files files2 = new Files("files2");
        files2.add(new Doc("f2A"));
        files2.add(new Doc("f2B"));

        rootFile.add(files2);
        rootFile.add(files1);
        rootFile.display(1);
    }
}
